/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Config;

/**
 *
 * @author PC
 */
public class Constants {
    // for config connection to db
    public static String JDBD_DRIVER = "jdbcDriver";
    public static String JDBD_URL = "jdbcUrl";
    public static String USERNAME = "sa";
    public static String PASSWORD = "8993091";
    public static String DATABASE = "ADGroupProject";
    public static String WEBINF = "/WEB-INF";
    // for checking login
    public static String USR_FAILED = "0";
    public static String USR_SUCCESSFUL = "1";
    public static String USR_BANNED = "false";
    public static String USR_ACTIVE = "true";
    public static String ROLE_ADMIN = "Admin";
    public static String ROLE_CUSTOMER = "Customer";
    // param fields
    public static String PARAM_USERNAME_LOG = "txtUsername";
    public static String PARAM_PASSWORD_LOG = "txtPassword";
    public static String PARAM_USERNAME_REG = "txtUsernameReg";
    public static String PARAM_PASSWORD_REG = "txtPasswordReg";
    public static String PARAM_FULLNAME = "txtFullname";
    public static String PARAM_PHONE = "txtPhone";
    public static String PARAM_EMAIL = "txtEmail";
    public static String PARAM_ADDRESS = "txtAddress";
    public static String PARAM_SELECTGENDER = "selectGender";
    public static String PARAM_SEARCH_KEY = "txtSearch";
    public static String PARAM_OLDPASS = "txtOldPass";
    public static String PARAM_NEWPASS = "txtNewPass";
    // attribute
    public static String ATTR_ROLE = "ROLE";
    public static String ATTR_USER = "USER";
    public static String ATTR_FULLNAME = "FULLNAME";
    public static String ATTR_LOGIN = "login";
    public static String ATTR_LOGIN_ERR = "loginError";
    public static String ATTR_LOGIN_ERR_MESS_INVALID = "Username or password is invalid!";
    public static String ATTR_LOGIN_ERR_MESS_BANNED = "User is banned!";
    public static String ATTR_REG = "registSuccess";
    public static String ATTR_REG_ERR_MESS = "Register failed!";
    public static String ATTR_USER_EXIST_ERR = "This username is existed. Please try another!";
    public static String ATTR_REG_SUC_MESS = "Register successfully!";
    public static String ATTR_USERNAME = "username";
    public static String ATTR_CURRPAGE = "currPage";
    public static String ATTR_SEARCHPAGE = "seatchPage";
    public static String ATTR_HOMEPAGE = "home";
    public static String ATTR_SEARCH_ERR = "searchError";
    public static String ATTR_SEARCH_ERR_MESS = "No product matched this key!";
    public static String ATTR_SEARCH_KEY = "searchKey";
    public static String ATTR_SEARCH_RESULT = "searchResult";
    // for action
    public static String BTN_ACTION = "btnAction";
    public static String ACT_ACCOUNT = "account";
    public static String ACT_LOGIN = "login";
    public static String ACT_LOGOUT = "logout";
    public static String ACT_REGISTER = "Register";
    public static String ACT_HOME = "home";
    public static String ACT_SEARCH = "search";
    public static String ACT_ACCOUNTDETAIL = "accountDetail";
    public static String ACT_VIEWACCOUNTDETAIL = "viewAccountDetail";
    public static String ACT_UPDATEACCOUNTDETAIL = "updateAccountDetail";
    public static String ACT_CHANGEPASSWORD = "changePassword";
    // for jsp
    public static String PAGE_INDEX = "index.jsp";
    public static String PAGE_LOGIN = WEBINF + "/loginPage.jsp";
    public static String PAGE_MANAGE_PRODUCT = WEBINF + "/Admin/manageProduct.jsp";
//    public static String PAGE_REGISTER = WEBINF + "/registerPage.jsp";
    public static String PAGE_MAIN = "mainPage.jsp";
    public static String PAGE_SEARCH = WEBINF + "/searchPage.jsp";
    public static String PAGE_ACCOUNTDETAIL = WEBINF + "/accountDetail.jsp";
    // common
    public static String BLANK_VALUE = "";
    public static int ZERO_VALUE = 0;
    public static String MALE = "male";
    public static String BOOL_TRUE = "true";
    // for marshal - unmarshal
    public static String CONTEXT_REALPATH = "/";
    public static String FILEPATH_XML_PRODUCTS = "WEB-INF/productList.xml";
    // for message
    public static String MESS_CHANGEPASS_ERR_BLANK = "Old password and New password must be filled";
    public static String MESS_CHANGEPASS_ERR_MISSMATCH = "Old password missmatch!";
    public static String MESS_CHANGEPASS_SUCCESS = "Password has been changed successfully";
    public static String MESS_VIEWACCOUNTDETAIL_ERR = "View account detail has occurred error. Please try again";
    public static String MESS_UPDATEACCOUNTDETAIL_ERR = "Update account detail has occurred error. Please try again";
    public static String MESS_UPDATEACCOUNTDETAIL_ERR_BLANKEMAIL = "Update account detail has occurred error. Please try again";
}
